package cpgears.movie {
	import cpgears.properties.WidgetPropertiesBase;
	import flash.events.EventDispatcher;
	/**
	 * ...
	 * @author Whyves
	 */
	public class MovieMock {
		
		private var mProperties:WidgetPropertiesBase = null;
		internal var CaptivateVersion:String = "5.0.0";
		
		
		public function MovieMock(properties:WidgetPropertiesBase = null) {
			mProperties = (properties == null) ? new WidgetPropertiesBase(prototype) : properties;
		}

		public function widgetParams():String {
			return "<object><property id='param1'><string>OK</string></property></object>";
		}
		
		public function getMovieProps():Object {
			return new CPMovieProperties(this);
		}

		public function getContainerProps():Object {
			return new CPContainerProperties("Slide");
		}
		
		public function getSlideProps():Object {
			return new CPSlideProperties();
		}
		
		public function replaceVariables(text:String):String {
			return null;
		}
		
		public function isWidgetEnabled():Boolean {
			return true;
		}
		
		public function isWidgetVisible():Boolean {
			return true;
		}
		
		public function cpGetValue(variable:String):Object {
			return this[variable];
		}
	}
}
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;

// =========================
//   CPContainerProperties
// =========================

class CPContainerProperties
{
	public function CPContainerProperties(containerTypeVal:String="Slide")
	{
		this._containerType = containerTypeVal;
	}
	/**
	* @private
	*/
	private var _containerType:String;

	public function get containerType():String
	{
		return _containerType;
	}
}

// =====================
//   CPMovieProperties
// =====================
class CPMovieProperties
{
	private var mMainMovie:Object = null;
	
	public function CPMovieProperties(mainMovie:Object) {
		mMainMovie = mainMovie;
	}
	
	public function get contentWidth():Number {
		return 100.0;
	}
	
	public function get contentHeight():Number {
		return 200.0;
	}
	
	public function get variablesHandle():Object
	{
		return mMainMovie;
	}
	
	public function get eventDispatcher():IEventDispatcher {
		return new EventDispatcher();
	}
}

// =====================
//   CPSlideProperties
// =====================
class CPSlideProperties
{
	public function get startFrame():Number {
		return 100;
	}
	
	public function get endFrame():Number {
		return 200;
	}
	
	public function get slideType():String {
		return "Normal Slide";
	}
}
